package com.scs.service.impl;

import com.scs.dao.UploadTaskMapper;
import com.scs.pojo.UploadTask;
import com.scs.service.UploadTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("UploadTaskService")
public class UploadTaskServiceImpl implements UploadTaskService {
    @Autowired
    private UploadTaskMapper uploadTaskMapper;
    @Override
    public int uploadTaskUpdate(String userId, String taskId, String path, String fileName, String status,String uploadClaim) {
        return uploadTaskMapper.uploadTaskUpdate(userId,taskId,path,fileName,status,uploadClaim);
    }
    @Override
    public int uploadTaskInsert(List<UploadTask> uploadTasks) {
        return uploadTaskMapper.uploadTaskInsert(uploadTasks);
    }
    @Override
    //获取学生作业通过作业号
    public List<UploadTask> getStudentsTaskByTaskId(String taskId) {
        return uploadTaskMapper.getStudentsTaskByTaskId(taskId);

    }
    @Override
    public List<UploadTask> studentGetUploadTask(String userId) {
        return uploadTaskMapper.studentGetUploadTask(userId);
    }

    @Override
    public int teacherDeleteTask(List<String> taskId) {
        return uploadTaskMapper.teacherDeleteTask(taskId);
    }

    @Override
    public List<UploadTask> searchOfTaskSubmit(String taskId, String key) {
        return uploadTaskMapper.searchOfTaskSubmit(taskId,key);
    }

    @Override
    public int teacherCorrectUploadTask(String userId, String taskId, String score, String teacherComment, String checkStatus) {
        return uploadTaskMapper.teacherCorrectUploadTask(userId,taskId,score,teacherComment,checkStatus);
    }
}
